<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="generator" content="PSPad editor, www.pspad.com">
    <title>TJ Sokol ZDELOV - oficiální stránky fotbalového klubu</title>
    <link rel="stylesheet" type="text/css" href="../css/print.css">
  </head>
  
  <body>

<?
require_once("../inc/functions.php");
require_once("../class/DBConnection.php");
DBConnection::connect("../config/connection.cfg");
require_once("../inc/dao.php");
require_once("../class/DateFormat.php");

$img_path = "../temp/roster_pic.png";

if(isset($_POST['img'])) {
	draw_roster_picture($img_path);
}

$id_clanku = $_GET['id_clanku'];

$query = getReportAndPlayersCount($id_clanku);
$fetch = MySQL_Fetch_Array($query);
$datum = DateFormat::format($fetch["CAS_UPRAVY"], DF_DDMMYYYYHHMM);
$nadpis = $fetch["NADPIS"];
$popis = $fetch["POPIS"];
$text = $fetch["TEXT"];
$autor = $fetch["autor"];
$id_utkani = $fetch["id_utkani"];
$pocet_hracu = $fetch["pocet_hracu"];

if($id_utkani != "" && $pocet_hracu >= 11 && !isset($_POST['img'])) {
?>
<object class="centered"
	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
	codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
	width="500" height="350" id="swf/sestava" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="movie"
		value="<? echo "../swf/sestava.swf?id_utkani=$id_utkani&id_clanku=$id_clanku&export=1"; ?>" />
	<param name="quality" value="high" />
	<param name="bgcolor" value="#FFFFFF" />
	<param name="wmode" value="opaque" />
	<embed src="<? echo "../swf/sestava.swf?id_utkani=$id_utkani&id_clanku=$id_clanku&export=1"; ?>"
		quality="high" wmode="opaque" bgcolor="#FFFFFF" width="500"
		height="350" name="swf/sestava" align="middle"
		allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
		pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
	<?
} else {

echo "<div id='clanek'>";
echo "<div class='title'>$nadpis</div>";
echo "<div class='date'>$datum</div>";
echo "<div class='content'>$popis</div>";
if(isset($_POST['img'])) { echo "<div style='margin: 10px 0px;text-align:center;'><img alt='Vygenerovaná soupiska' src=\"".$img_path."\"/></div>"; }
echo "<div class='content'>$text</div>";
echo "<div class='author'>-".$autor."-</div>";
echo "</div>";
}
?>
</body>
</html>